export const formatDateTime = (date) => {
    if (!date) return null;
    const d = new Date(date);
    // 转换为本地时间
    const localDate = new Date(d.getTime() - d.getTimezoneOffset() * 60000);
    return localDate.toISOString().replace('T', ' ').substring(0, 19);
};